package com.ky.gp.app.controller;

import com.ky.common.param.ProblemAdd;
import com.ky.common.vo.R;
import com.ky.gp.app.service.StaticFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * --- 天道酬勤 ---
 *
 * @author lvchengrui
 * @date 2024/6/20
 * @desc \
 * -- 代码敲烂 月薪过万--
 */
@RestController
@RequestMapping(value = "/api/study")
public class StaticController {

    @Autowired
    private StaticFeign staticFeign;



    @RequestMapping("/static/articleImg/{articleId}")
    public R articleImg(@PathVariable int articleId){
        return R.ok(staticFeign.articleImg(articleId));
    }



    @RequestMapping("/static/addProblemImg")
    public R addProblemImg(HttpServletRequest request, @RequestBody ProblemAdd problemAdd){
        return R.ok(staticFeign.addProblemImg(problemAdd));
    }


}
